<script setup lang="ts">
import FxNaiveProvider from '@/naive/provider';
// theme
import { createTheme, darkTheme as _darkTheme } from 'naive-ui';
// locale & dateLocale
import { zhCN, dateZhCN } from 'naive-ui';

// 获取全局组件大小
const getGlobalComponentSize = computed(() => {
  return {
    // theme: darkTheme, // createTheme([])
    theme: createTheme([]),
    locale: zhCN,
    dateLocale: dateZhCN
  };
});

</script>

<template>
  <NConfigProvider v-bind="getGlobalComponentSize">
    <FxNaiveProvider>
      <RouterView v-slot="{Component}">
        <Component :is="Component"></Component>
      </RouterView>
    </FxNaiveProvider>
  </NConfigProvider>
</template>

<style lang="scss" scoped>
.n-config-provider{
  height: 100%;
  width: 100%;
}
</style>